﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace ShadowGame
{
    public static class BackgroundManager
    {
        private static Texture2D texture;
        private static Rectangle destinationRect;

        public static void Initialize(
            Texture2D bgTexture,
            Rectangle destRect)
        {
            texture = bgTexture;
            destinationRect = destRect;
        }

        public static int Width
        {
            get { return texture.Width; }
        }

        public static int Height
        {
            get { return texture.Height; }
        }

        public static Rectangle WorldRectangle
        {
            get { return texture.Bounds; }
        }

        public static void Update(GameTime gameTime)
        {
        }

        public static void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(
                texture,
                destinationRect,
                Camera.ViewPort,
                Color.White,
                0.0f,
                Vector2.Zero,
                SpriteEffects.None,
                0.0f);
        }
    }
}
